/*
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use 'sass:map';
@use 'node_modules/@angular/material' as mat;
@use '@gravitee/ui-particles-angular' as gio;

$accent: map.get(gio.$mat-theme, accent);

:host {
  display: flex;
}

.card {
  @include mat.elevation(1);
  flex: 1 1 auto;
  margin: 6px;
  cursor: pointer;
  min-height: 40px;
  min-width: 64px;

  & > .selection-icon {
    opacity: 0;
    cursor: pointer;
    color: mat.get-color-from-palette($accent);
    background: #fff;
    position: absolute;
    right: 4px;
    top: 4px;
    border-radius: 100%;
    height: 24px;
    width: 24px;
  }

  &.selected {
    border: 1px solid mat.get-color-from-palette($accent);
    margin: 5px;

    & > .selection-icon {
      opacity: 1;
    }
  }

  &:hover {
    @include mat.elevation-transition();
    @include mat.elevation(3);

    & > .selection-icon {
      opacity: 1;
    }
  }

  &__content {
    margin-bottom: 0;
  }
}
